package com.example.mylibrarybase.yumengmeng08.ui;

import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.example.mylibrarybase.R;
import com.example.mylibrarybase.bar.initAction_Bar;
import com.example.mylibrarybase.base.baseui.BaseActivity;
import com.example.mylibrarybase.utils.LogUtils;
import com.example.mylibrarybase.yumengmeng08.utils.dialog.CheckStatus;
import com.example.mylibrarybase.yumengmeng08.utils.dialog.DialogUtils;

public class MainActivity_dialog_08 extends BaseActivity {

    private initAction_Bar mBase_action_bar;
    private TextView mDialog_tv;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        initView();
    }

    @Override
    public int getlayouXML() {
        return R.layout.activity_main_dialog_08;
    }

    @Override
    public void initView() {
        mBase_action_bar = (initAction_Bar) findViewById(R.id.base_action_bar);
        mBase_action_bar
                .setMode(initAction_Bar.AUTO_ONCLICK_MODE)
                .setCallBack(new initAction_Bar.Action_bar_call_back() {
                    @Override
                    public void getAction_barView_backbutton(TextView textView) {

                    }

                    @Override
                    public void getAction_barView_backbutton_icon(ImageView imageView) {

                    }

                    @Override
                    public void getAction_barView_title(TextView textView) {
                        textView.setText("dialog 显示框");
                    }

                    @Override
                    public void getAction_barView_right_icon(ImageView imageView) {

                    }
                });

        mDialog_tv = (TextView) findViewById(R.id.dialog_tv);

        mDialog_tv.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                DialogUtils.startDialog(MainActivity_dialog_08.this, 1, CheckStatus.CANCELLATION_OF_ORDER, 1, new DialogUtils.callback() {
                    @Override
                    public void confirm(String selectorButton, String which, int status, int position) {
                        LogUtils.i("点了确定");
                    }

                    @Override
                    public void cancel() {
                        LogUtils.i("点了取消");
                    }

                    @Override
                    public void dismiss() {
                        LogUtils.i("关闭了");
                    }
                });
            }
        });
    }

    @Override
    public void initData() {

    }
}
